<html>
<head><meta charset="utf-8"><title>Integer-to-pointer, provenance, and hardware addresses · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html">Integer-to-pointer, provenance, and hardware addresses</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="229131630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229131630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229131630">(Mar 06 2021 at 21:44)</a>:</h4>
<p>In a world in which pointers and integers have provenance, what is the "correct" way to access a fixed-offset hardware address like: <code>let reg = (0x80000012 as *mut u32); *reg = 42;</code> ?</p>



<a name="229131657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229131657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229131657">(Mar 06 2021 at 21:44)</a>:</h4>
<p>How do you turn an arbitrary numeric address into a valid pointer and start using it? (Assume you're in a context where doing so makes sense, such as supervisor-level code.)</p>



<a name="229131919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229131919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229131919">(Mar 06 2021 at 21:48)</a>:</h4>
<p>Casting an integer to pointer and dereferencing it is the right way to do it, I think. As long as the address is not "definitely invalid" (which 0 would be for example)</p>



<a name="229132070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229132070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229132070">(Mar 06 2021 at 21:50)</a>:</h4>
<p>for allocations that are "managed by the language" and put at an arbitrary position, one could make a point that you can only cast an int to such a ptr if you previously cast a ptr into that allocation to an int. (i.e., "no guessing".)<br>
but for allocations that are definitely at a fixed address, just casting from an int to a ptr is okay in terms of basic provenance. you still have to ensure compliance with Rust's aliasing rules, ofc.</p>



<a name="229133604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229133604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229133604">(Mar 06 2021 at 22:14)</a>:</h4>
<p>And don't forget the volatile :)</p>



<a name="229133655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229133655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229133655">(Mar 06 2021 at 22:15)</a>:</h4>
<p>And avoid creating references, since the compiler can insert spurious reads, which might have side effects</p>



<a name="229133946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229133946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229133946">(Mar 06 2021 at 22:20)</a>:</h4>
<p>hardware addresses should be accessed only with volatile ops, should not have references created to them (please don't use any sort of <code>&amp;VolatileCell</code> style abstraction, it's incorrect for current rust), and because we only have "standard" volatile in rust at this time they must be aligned and also must be externally synchronized by you if a race could occur (often a race cannot occur, so you can often skip this requirement).</p>
<p>As a member of T-lang you could position for unaligned_volatile ops to be added ;3 though I honestly don't think they'd be used much even if they did exist.</p>



<a name="229134130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134130">(Mar 06 2021 at 22:23)</a>:</h4>
<p>I know you didn't say that, but I wouldn't brush over synchronization, a lot of people get it wrong when it comes to volatile</p>



<a name="229134189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134189">(Mar 06 2021 at 22:24)</a>:</h4>
<p>Also, it should be noted that an entire ecosystem uses <code>&amp;VolatileCell</code>, unfortunately</p>



<a name="229134245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134245">(Mar 06 2021 at 22:25)</a>:</h4>
<p>I still think a type that removes the dereferenciable attribute would be beneficial</p>



<a name="229134260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134260">(Mar 06 2021 at 22:25)</a>:</h4>
<p>Not the <em>entire</em> ecosystem, no</p>



<a name="229134328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134328">(Mar 06 2021 at 22:26)</a>:</h4>
<p>Sorry, almost an entire ecosystem</p>



<a name="229134336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134336">(Mar 06 2021 at 22:26)</a>:</h4>
<p>;3c</p>



<a name="229134344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134344">(Mar 06 2021 at 22:26)</a>:</h4>
<p>The <code>gba</code> crate does it properly</p>



<a name="229134371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134371">(Mar 06 2021 at 22:27)</a>:</h4>
<p>And we should probably do it too</p>



<a name="229134468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134468">(Mar 06 2021 at 22:29)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> you do with associated constants, right ?</p>



<a name="229134480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134480">(Mar 06 2021 at 22:29)</a>:</h4>
<p>Regarding sync: the difficulty is high if you need it, yes. Because volatile, atomic, and "standard" accesses each have their own reordering applied to their accesses.</p>
<p>and I heard llvm will recognize "atomic volatile", but rust does not have that even if llvm does</p>



<a name="229134545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134545">(Mar 06 2021 at 22:30)</a>:</h4>
<p><span class="user-mention" data-user-id="267734">@Thales Fragoso</span> yes, approximately. there's a min_const_generics update coming as soon as that's stable</p>



<a name="229134605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134605">(Mar 06 2021 at 22:31)</a>:</h4>
<p>Also, although volatile can't be re-ordered w.r.t other volatiles, it can still be observed in another order</p>



<a name="229134665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134665">(Mar 06 2021 at 22:32)</a>:</h4>
<p>oh wack</p>



<a name="229134735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134735">(Mar 06 2021 at 22:33)</a>:</h4>
<p>Sync instructions aren't generated when using volatile, so the hardware doesn't guarantee that</p>



<a name="229134848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134848">(Mar 06 2021 at 22:35)</a>:</h4>
<p>But in the case of MMIO, it usually doesn't make difference, since that memory usually has some special attributes</p>



<a name="229134882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229134882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229134882">(Mar 06 2021 at 22:35)</a>:</h4>
<p>the secret is to use ancient hardware without oox</p>



<a name="229135076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229135076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229135076">(Mar 06 2021 at 22:38)</a>:</h4>
<p>A bug was found once in a ethernet driver, because the hardware would read some header off RAM to do some DMA operations. Both the header and the MMIO were updated through volatile, but the DMA hardware wouldn't observe the RAM write before the enable write</p>



<a name="229135112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229135112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Thales Fragoso <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229135112">(Mar 06 2021 at 22:39)</a>:</h4>
<p>That was a case where volatile wasn't enough and you need a fence, and I'm not talking about some fancy processor, it was just a cortex-m7</p>



<a name="229135214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/229135214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#229135214">(Mar 06 2021 at 22:40)</a>:</h4>
<p>fun, fun, fun...</p>



<a name="231161041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/231161041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> hyd-dev <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#231161041">(Mar 20 2021 at 17:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses/near/229131919">said</a>:</p>
<blockquote>
<p>As long as the address is not "definitely invalid" (which 0 would be for example)</p>
</blockquote>
<p>FWIW I found an interesting <code>null_pointer_is_valid</code> LLVM function attribute <a href="https://llvm.org/docs/LangRef.html#function-attributes">here</a>.</p>



<a name="231161059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer%2C%20provenance%2C%20and%20hardware%20addresses/near/231161059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Integer-to-pointer.2C.20provenance.2C.20and.20hardware.20addresses.html#231161059">(Mar 20 2021 at 17:58)</a>:</h4>
<p>Yeah that's to support the "dont optimize away NULL ptr checks" clang flag</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>